/*
 * Copyright (C) 2009 Kristopher T Babic
 *
 * This program is free software; you can redistribute it and/or modify it under the terms of
 * the GNU General Public License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with this program;
 * if not, see <http://www.gnu.org/licenses>.
 */

package edu.idp.server;

import ex.Server;

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.LinkedList;

/**
 * This class definately needs some extra work, since in actuality it will not work
 * , especially with the current security restrictions in java.
 *
 * @author Kristopher T Babic
 */
public class InterDrawRoutingService implements Server.Service {
    private LinkedList saved;
    private String host = new String("localhost");
    private int port = 2255;
    private boolean running = true;

    public void serve(Socket s, InputStream i, OutputStream o) throws IOException {
        /*
              try {
                  PrintWriter out = new PrintWriter(new OutputStreamWriter(o));
                  out.println(host+"|"+port);
              }
              */

        try {
            Socket mySock = new Socket(host, port);

            //...
        }
        catch (Exception e) {
            System.err.println(e);
        }

        System.out.println("done baby");

        try {
            o.close();
            i.close();
        }
        catch (Exception e) {
        }
    }

}
